﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace IRC.IRepairClouds.DataLayer.Expressions
{
    public sealed class MethodCallExpressionBuilder<T> : ExpressionBuilder<T>
    {
        public MethodCallExpression SpecificExpression
        {
            get { return (MethodCallExpression)Expression; }
        }

        internal MethodCallExpressionBuilder(MethodCallExpression expression)
            : base(expression)
        {
        }

        public static implicit operator MethodCallExpression(MethodCallExpressionBuilder<T> expressionBuilder)
        {
            return expressionBuilder.SpecificExpression;
        }

        public static implicit operator MethodCallExpressionBuilder<T>(MethodCallExpression expression)
        {
            return new MethodCallExpressionBuilder<T>(expression);
        }
    }
}
